import React from 'react'
// 类形式创建组件
class Tabs extends React.Component {
  // {/* 排序 */}
  render() { 
   console.log(this.props)
   const { tabs, active, hUpdateActive } = this.props
      return (
            <div className="tabs-order">
                    <ul className="sort-container">
                        {tabs.map((item) => (
                        <li
                            className={item.type === active ? 'on' : ''}
                            key={item.id}
                            onClick={() => {
                                hUpdateActive(item.type)
                            }}>
                            按{item.name}排序
                        </li>
                        ))}
                        {/* <li className="on">按{热度}排序</li> */}
                        {/* <li>按时间排序</li> */}
                    </ul>
            </div>
        ) 
    }
 
  }
  export default Tabs
 